using System;
using System.Security.Principal;
using AndyPike.Commons.Persistence;
using AndyPike.Snowflake.Core.Messages;
using AndyPike.Snowflake.Entities;

namespace AndyPike.Snowflake.Core.Services
{
    public interface IAccountService
    {
        Guid RegisterAccount(RegistrationMessage registration);
        IMessageToEntityMapper<RegistrationMessage, Account> RegistrationToAccountMapper { get; set; }
        IEntityToMessageMapper<Account, AccountInfoMessage> AccountToAccountInfoMessageMapper { get; set; }
        IPrincipal RetrievePrincipleFromAuthenticationToken(Guid authenticationToken);
        Guid AuthenticateCredentials(CredentialsMessage credentialsMessage);
    }
}